<?php
        header("Content-type:text/html;charset=utf-8");
        $con = mysqli_connect("localhost", 'root', '', 'ksdb2');
        mysqli_set_charset($con, "utf8");
        
        $cl_name = $_GET['cl_name'];

        $mj_id  = $_GET['mj_id'];

        $cl_id  = $_GET['cl_id'];

        $sql = "UPDATE class set cl_name='$cl_name',mj_id='$mj_id' where cl_id=$cl_id;";
        
        
        // 执行插入语句
        if($con->query($sql))
        {
            echo "修改成功";
        //删完回去表页面
        }
        else{
            echo "修改失败";
        }
        
        // 回到首页
        header("location:class.php");
        mysqli_close($con);
    ?>

